package com.example.demo.demos.web;

import org.springframework.web.bind.annotation.*;

@RestController
public class MyTest3 {
    @GetMapping(value = "test2")
    public String test2(String user){
        return user;
    }
    @GetMapping(value = "tset3")
    public String test3(@RequestParam(value = "username") String user){
        return user;
    }
    @PostMapping(value = "test4")
    public String test4(String user,int age){
        return user + age;
    }
    @PostMapping(value = "test5")
    public String test5(@RequestBody User user){
        return user.toString();
    }



}
